Name :Modulo arithmetic
Symbol :MOD
Illustrate:
Divide the first input parameter by the second input parameter, and the resulting remainder is output as the value of OUT.
Image:
Parameter:
| Parameter | Statement | Type | Description |
|---|---|---|---|
| IN1 | Input | INT/SINT/DINT/UINT/USINT/UDINT | The first input value |
| IN2 | Input | INT/SINT/DINT/UINT/USINT/UDINT | The second input value |
| OUT | Output | INT/SINT/DINT/UINT/USINT/UDINT | Output value |
Example:
LD:
ST:
Interpretation:
| parameter | operand | value |
|---|---|---|
| IN1 | TagIn1 | Enter a value:10 |
| IN2 | TagIn2 | Enter a value:3 |
| OUT | TagOut | Output value:1 |
IN1 and IN2 input the corresponding type of data, and the MOD outputs the remainder calculated by division.